<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Passport extends CI_Controller
{
    public function login()
    {
        $this->load->view('login');
    }

    public function verify()
    {
        $this->load->model("User_Model");
        $this->load->helper('url');
        if ($this->User_Model->verify($_POST)) {
            redirect('admin/article/search');
        } else {
            redirect('passport/login');
        }
    }

    public function signout()
    {
        $this->load->helper('url');
        $this->load->library('session');
        $this->session->sess_destroy();
        redirect('passport/login');
    }

}